package com.zzc.controller;
import com.select.pojo.Teacher;
import com.zzc.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@CrossOrigin
@Controller
public class LoginController {
    @Autowired
    LoginService loginService;
    Teacher teacher;
    @GetMapping("/denglu")
    @ResponseBody
    public String denglu(Teacher teacher){

        if(loginService.find(teacher)==null){
            return "fail";
        }else {

            return "success";
        }

           }
}
